home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / SOM / OpenDoc and SOM / IDL / Part.idl < prev    next >
Encoding:
Text File  |  1994-04-19  |  9.8 KB  |  355 lines  |  [TEXT/MPS ]

  1. //# Copyright:    © 1993-94 by Apple Computer, Inc., all rights reserved.
  2. #ifndef _PART_
  3. #define _PART_
  4.  
  5. #ifndef _PSTOBJ_
  6. #include "PstObj.idl"
  7. #endif
  8.  
  9. //==============================================================================
  10. // Constants
  11. //==============================================================================
  12.  
  13. const ODID kNewGroup = 0;
  14.  
  15. //==============================================================================
  16. // Classes defined in this interface
  17. //==============================================================================
  18.  
  19. interface  ODPart;
  20.  
  21. //==============================================================================
  22. // Classes used by this interface
  23. //==============================================================================
  24.  
  25. interface  ODCanvas;
  26. interface  ODFacet;
  27. interface  ODFrame;
  28. interface  ODLink;
  29. interface  ODLinkSource;
  30. interface  ODShape;
  31. interface  ODStorageUnit;
  32. interface  ODStorageUnitView;
  33. interface  ODTransform;
  34. interface  ODDragItemIterator;
  35. interface  ODSession;
  36. interface  ODTypeSet;
  37. interface  ODEmbeddedFramesIterator;
  38.  
  39. //# $$$$$ struct ODPoint;
  40.  
  41. //==============================================================================
  42. // ODPart
  43. //==============================================================================
  44.  
  45. interface ODPart :  ODPersistentObject
  46. {
  47.  
  48.   //-------------------------------------------------------------------------
  49.   // From DragAndDrop protocol
  50.   //-------------------------------------------------------------------------
  51.  
  52.    void FulfillPromise(in ODStorageUnitView promiseSUView);
  53.   
  54.    void DropCompleted(in ODPart destPart,
  55.                          in ODDropResult dropResult);
  56.     
  57.    void DragEnter(in ODDragItemIterator dragInfo,
  58.                      in ODFacet facet,
  59.                   in ODPoint where);
  60.  
  61.    void DragWithin(in ODDragItemIterator dragInfo,
  62.                       in ODFacet facet,
  63.                    in ODPoint where);
  64.  
  65.    void DragLeave(in ODFacet facet,
  66.                   in ODPoint where);
  67.  
  68.    ODDropResult Drop(in ODDragItemIterator dropInfo,
  69.                      in ODFacet facet,
  70.                      in ODPoint where);
  71.  
  72.   //-------------------------------------------------------------------------
  73.   // From Embedding protocol
  74.   //-------------------------------------------------------------------------
  75.  
  76.    void ContainingPartPropertiesChanged(in ODFrame frame,
  77.                                            in ODStorageUnit propertyUnit);
  78.  
  79.   // ********* for containing parts *********
  80.  
  81.    ODStorageUnit  GetContainingPartProperties(in ODFrame frame);
  82.  
  83.    void RevealFrame(in ODFrame embeddedFrame,
  84.                        in ODShape revealShape);
  85.     
  86.    void EmbeddedFrameSpec(in ODFrame embeddedFrame,
  87.                              in ODObjectSpec spec);
  88.     
  89.    ODEmbeddedFramesIterator CreateEmbeddedFramesIterator(in ODFrame frame);
  90.  
  91.   //-------------------------------------------------------------------------
  92.   // From Frames protocol
  93.   //-------------------------------------------------------------------------
  94.  
  95.    void AddDisplayFrame(in ODFrame frame);
  96.  
  97.    void AttachSourceFrame(in ODFrame frame,
  98.                              in ODFrame sourceFrame);
  99.  
  100.    void RemoveDisplayFrame(in ODFrame frame);
  101.  
  102.    void CloseDisplayFrame(in ODFrame frame);
  103.  
  104.    void FrameShapeChanged(in ODFrame frame);
  105.  
  106.    void ViewTypeChanged(in ODFrame frame);
  107.  
  108.    void PresentationChanged(in ODFrame frame);
  109.  
  110.    void WritePartInfo(in ODPtr partInfo,
  111.                          in ODStorageUnitView storageUnitView);
  112.  
  113.    ODPtr ReadPartInfo(in ODFrame frame,
  114.                          in ODStorageUnitView storageUnitView);
  115.  
  116.    ODID Open(in ODFrame frame);
  117.  
  118.   //---------------------------------
  119.   // for containing parts
  120.  
  121.    ODFrame  CreateEmbeddedFrame(in ODFrame containingFrame,
  122.                                    in ODShape frameShape,
  123.                                 in ODTransform externalTransform,
  124.                                 in ODPart embedPart,
  125.                                 in ODTypeToken viewType,
  126.                                 in ODTypeToken presentation,
  127.                                 in ODID frameGroupID,
  128.                                 in ODBoolean isOverlaid);
  129.  
  130.     // create a new frame and embed a part in it.
  131.     
  132.    void RemoveEmbeddedFrame(in ODFrame embeddedFrame);
  133.  
  134.    ODShape  RequestFrameShape(in ODFrame embeddedFrame,
  135.                                  in ODShape frameShape);
  136.  
  137.    void UsedShapeChanged(in ODFrame embeddedFrame);
  138.  
  139.    ODShape AdjustBorderShape(in ODFrame embeddedFrame,
  140.                                  in ODShape shape);
  141.  
  142.   //-------------------------------------------------------------------------
  143.   // From Facet protocol
  144.   //-------------------------------------------------------------------------
  145.  
  146.    void FacetAdded(in ODFacet facet);
  147.  
  148.    void FacetRemoved(in ODFacet facet);
  149.  
  150.    void CanvasChanged(in ODFacet facet);
  151.  
  152.    void ClipShapeChanged(in ODFacet facet);
  153.  
  154.    void ExternalTransformChanged(in ODFacet facet);
  155.  
  156.   //-------------------------------------------------------------------------
  157.   // From Imaging protocol
  158.   //-------------------------------------------------------------------------
  159.  
  160.    void Draw(in ODFacet facet,
  161.                 in ODShape invalidShape);
  162.  
  163.    void CanvasUpdated(in ODCanvas canvas);
  164.  
  165.    void HighlightChanged(in ODFacet facet);
  166.  
  167.    ODULong GetPrintResolution(in ODFrame frame);
  168.  
  169.   //-------------------------------------------------------------------------
  170.   // From Linking protocol
  171.   //-------------------------------------------------------------------------
  172.  
  173.    ODLink  CreateLink(in ODPtr data,
  174.                          in ODULong size);
  175.  
  176.    void LinkUpdated(in ODLink updatedLink,
  177.                        in ODChangeID id);
  178.  
  179.    void RevealLink(in ODLinkSource linkSource);
  180.  
  181.    void  EmbeddedFrameChanged(in ODFrame frame,
  182.                                  in ODChangeID change);
  183.  
  184.    void  LinkStatusChanged(in ODFrame frame);
  185.  
  186.   //-------------------------------------------------------------------------
  187.   // From Part Activation protocol
  188.   //-------------------------------------------------------------------------
  189.  
  190.    ODBoolean BeginRelinquishFocus(in ODTypeToken focus,
  191.                                      in ODFrame ownerFrame,
  192.                                   in ODFrame proposedFrame);
  193.  
  194.    void CommitRelinquishFocus(in ODTypeToken focus,
  195.                                  in ODFrame ownerFrame,
  196.                               in ODFrame proposedFrame);
  197.               
  198.    void AbortRelinquishFocus(in ODTypeToken focus,
  199.                                 in ODFrame ownerFrame,
  200.                              in ODFrame proposedFrame);
  201.                   
  202.    void FocusAcquired(in ODTypeToken focus,
  203.                          in ODFrame ownerFrame);
  204.   
  205.    void FocusLost(in ODTypeToken focus,
  206.                      in ODFrame ownerFrame);
  207.                   
  208.  
  209.   //-------------------------------------------------------------------------
  210.   // From Storage protocol
  211.   //-------------------------------------------------------------------------
  212.  
  213.    void CloneInto(in ODDraftKey key,
  214.                      in ODStorageUnit storageUnit,
  215.                   in ODStorageUnit initiatingFrame);
  216.  
  217.   //-------------------------------------------------------------------------
  218.   // From Binding protocol
  219.   //-------------------------------------------------------------------------
  220.  
  221.    void ExternalizeKinds(in ODTypeSet kindset);
  222.  
  223.    void ChangeKind(in ODType kind);
  224.  
  225.   //-------------------------------------------------------------------------
  226.   // From UI Events protocol
  227.   //-------------------------------------------------------------------------
  228.  
  229.    ODBoolean HandleEvent(in ODEventData event,
  230.                             in ODFrame frame,
  231.                          in ODFacet facet);
  232.  
  233.    ODBoolean HandleEventInEmbedded(in ODEventData event,
  234.                                       in ODFrame frame,
  235.                                    in ODFacet facet,
  236.                                    in ODFrame embeddedFrame,
  237.                                    in ODFacet embeddedFacet);
  238.  
  239.    void MouseEnter(in ODFacet facet,
  240.                       in ODPoint where);
  241.   
  242.    void MouseWithin(in ODFacet facet,
  243.                        in ODPoint where);
  244.   
  245.    void MouseLeave(in ODFacet facet);
  246.   
  247.    void AdjustMenus(in ODFrame frame);
  248.     
  249.   //-------------------------------------------------------------------------
  250.   // From Undo protocol
  251.   //-------------------------------------------------------------------------
  252.  
  253.    void UndoAction(in ODActionData actionState);
  254.  
  255.    void RedoAction(in ODActionData actionState);
  256.  
  257.    void DisposeActionState(in ODActionData actionState,
  258.                               in ODDoneState doneState);
  259.  
  260.    void WriteActionState(in ODPtr actionState,
  261.                             in ODStorageUnitView storageUnitView);
  262.  
  263.    ODPtr ReadActionState(in ODStorageUnitView storageUnitView);
  264.  
  265.   // private by convention
  266.  
  267.   //-------------------------------------------------------------------------
  268.   // constructors/destructors
  269.   //-------------------------------------------------------------------------
  270.  
  271.   
  272.  
  273.    void InitPart(in ODStorageUnit storageUnit);
  274.     
  275.    void InitPartFromStorage(in ODStorageUnit storageUnit);
  276.  
  277. #ifdef __SOMIDL__
  278.   implementation
  279.     {
  280.     override:
  281.         somInit,
  282.         somUninit;
  283.     releaseorder:
  284.         FulfillPromise,
  285.         DropCompleted,
  286.         DragEnter,
  287.         DragWithin,
  288.         DragLeave,
  289.         Drop,
  290.         ContainingPartPropertiesChanged,
  291.         GetContainingPartProperties,
  292.         RevealFrame,
  293.         EmbeddedFrameSpec,
  294.         CreateEmbeddedFramesIterator,
  295.         AddDisplayFrame,
  296.         AttachSourceFrame,
  297.         RemoveDisplayFrame,
  298.         CloseDisplayFrame,
  299.         FrameShapeChanged,
  300.         ViewTypeChanged,
  301.         PresentationChanged,
  302.         WritePartInfo,
  303.         ReadPartInfo,
  304.         Open,
  305.         CreateEmbeddedFrame,
  306.         RemoveEmbeddedFrame,
  307.         RequestFrameShape,
  308.         UsedShapeChanged,
  309.         AdjustBorderShape,
  310.         FacetAdded,
  311.         FacetRemoved,
  312.         CanvasChanged,
  313.         ClipShapeChanged,
  314.         ExternalTransformChanged,
  315.         Draw,
  316.         CanvasUpdated,
  317.         HighlightChanged,
  318.         GetPrintResolution,
  319.         CreateLink,
  320.         LinkUpdated,
  321.         RevealLink,
  322.         EmbeddedFrameChanged,
  323.         LinkStatusChanged,
  324.         BeginRelinquishFocus,
  325.         CommitRelinquishFocus,
  326.         AbortRelinquishFocus,
  327.         FocusAcquired,
  328.         FocusLost,
  329.         CloneInto,
  330.         ExternalizeKinds,
  331.         ChangeKind,
  332.         HandleEvent,
  333.         HandleEventInEmbedded,
  334.         MouseEnter,
  335.         MouseWithin,
  336.         MouseLeave,
  337.         AdjustMenus,
  338.         UndoAction,
  339.         RedoAction,
  340.         DisposeActionState,
  341.         WriteActionState,
  342.         ReadActionState,
  343.         InitPart,
  344.         InitPartFromStorage;
  345.     
  346.   };
  347. #endif
  348. };
  349.  
  350.  
  351.  
  352. #endif // _PART_
  353.  
  354.  
  355.